package ink.yql.model;

import java.io.Serializable;

/**
 * @author YQL
 */
public class ProjectUpdate implements Serializable {
    /**
     * 更新id
     */
    private Integer puid;
    /**
     * 更新时间
     */
    private String pupdateTime;
    /**
     *  项目id
     */
    private Integer pid;
    /**
     * 更新的次数
     */
    private Integer pufrequency;
    /**
     *  更新的内容
     */
    private String pucontext;

    public ProjectUpdate(Integer puid, String pupdateTime, Integer pid, Integer pufrequency, String pucontext) {
        this.puid = puid;
        this.pupdateTime = pupdateTime;
        this.pid = pid;
        this.pufrequency = pufrequency;
        this.pucontext = pucontext;
    }

    public ProjectUpdate() {
    }

    public static ProjectUpdateBuilder builder() {
        return new ProjectUpdateBuilder();
    }

    public Integer getPuid() {
        return this.puid;
    }

    public String getPupdateTime() {
        return this.pupdateTime;
    }

    public Integer getPid() {
        return this.pid;
    }

    public Integer getPufrequency() {
        return this.pufrequency;
    }

    public String getPucontext() {
        return this.pucontext;
    }

    public void setPuid(Integer puid) {
        this.puid = puid;
    }

    public void setPupdateTime(String pupdateTime) {
        this.pupdateTime = pupdateTime;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public void setPufrequency(Integer pufrequency) {
        this.pufrequency = pufrequency;
    }

    public void setPucontext(String pucontext) {
        this.pucontext = pucontext;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof ProjectUpdate)) return false;
        final ProjectUpdate other = (ProjectUpdate) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$puid = this.getPuid();
        final Object other$puid = other.getPuid();
        if (this$puid == null ? other$puid != null : !this$puid.equals(other$puid)) return false;
        final Object this$pupdateTime = this.getPupdateTime();
        final Object other$pupdateTime = other.getPupdateTime();
        if (this$pupdateTime == null ? other$pupdateTime != null : !this$pupdateTime.equals(other$pupdateTime))
            return false;
        final Object this$pid = this.getPid();
        final Object other$pid = other.getPid();
        if (this$pid == null ? other$pid != null : !this$pid.equals(other$pid)) return false;
        final Object this$pufrequency = this.getPufrequency();
        final Object other$pufrequency = other.getPufrequency();
        if (this$pufrequency == null ? other$pufrequency != null : !this$pufrequency.equals(other$pufrequency))
            return false;
        final Object this$pucontext = this.getPucontext();
        final Object other$pucontext = other.getPucontext();
        if (this$pucontext == null ? other$pucontext != null : !this$pucontext.equals(other$pucontext)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof ProjectUpdate;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $puid = this.getPuid();
        result = result * PRIME + ($puid == null ? 43 : $puid.hashCode());
        final Object $pupdateTime = this.getPupdateTime();
        result = result * PRIME + ($pupdateTime == null ? 43 : $pupdateTime.hashCode());
        final Object $pid = this.getPid();
        result = result * PRIME + ($pid == null ? 43 : $pid.hashCode());
        final Object $pufrequency = this.getPufrequency();
        result = result * PRIME + ($pufrequency == null ? 43 : $pufrequency.hashCode());
        final Object $pucontext = this.getPucontext();
        result = result * PRIME + ($pucontext == null ? 43 : $pucontext.hashCode());
        return result;
    }

    public String toString() {
        return "ProjectUpdate(puid=" + this.getPuid() + ", pupdateTime=" + this.getPupdateTime() + ", pid=" + this.getPid() + ", pufrequency=" + this.getPufrequency() + ", pucontext=" + this.getPucontext() + ")";
    }

    public static class ProjectUpdateBuilder {
        private Integer puid;
        private String pupdateTime;
        private Integer pid;
        private Integer pufrequency;
        private String pucontext;

        ProjectUpdateBuilder() {
        }

        public ProjectUpdate.ProjectUpdateBuilder puid(Integer puid) {
            this.puid = puid;
            return this;
        }

        public ProjectUpdate.ProjectUpdateBuilder pupdateTime(String pupdateTime) {
            this.pupdateTime = pupdateTime;
            return this;
        }

        public ProjectUpdate.ProjectUpdateBuilder pid(Integer pid) {
            this.pid = pid;
            return this;
        }

        public ProjectUpdate.ProjectUpdateBuilder pufrequency(Integer pufrequency) {
            this.pufrequency = pufrequency;
            return this;
        }

        public ProjectUpdate.ProjectUpdateBuilder pucontext(String pucontext) {
            this.pucontext = pucontext;
            return this;
        }

        public ProjectUpdate build() {
            return new ProjectUpdate(puid, pupdateTime, pid, pufrequency, pucontext);
        }

        public String toString() {
            return "ProjectUpdate.ProjectUpdateBuilder(puid=" + this.puid + ", pupdateTime=" + this.pupdateTime + ", pid=" + this.pid + ", pufrequency=" + this.pufrequency + ", pucontext=" + this.pucontext + ")";
        }
    }
}
